{* Smarty *}
<div class="box">
	<table cellspacing="0">
		<caption>{t}add user caption{/t}</caption>
		<tr>
			<th>{t}add user{/t}</th>
		</tr>
		<tr>
			{if isset($result)}
			<td class="success"><a class="success" href="/admin/accesscontrol/users">{t}user added{/t}</a></td>
			{else}
			<td class="form">
				<form {$form_data.attributes}>
				<table class="form">
					<tr>
				 	  <td class="form">{$form_data.firstname.label}</td><td class="form">{$form_data.firstname.html}</td>
					</tr>
					<tr>
				 	  <td class="form">{$form_data.lastname.label}</td><td class="form">{$form_data.lastname.html}</td>
					</tr>
					<tr>
				 	  <td class="form">{$form_data.email.label}</td><td class="form">{$form_data.email.html}</td>
					</tr>
					<tr>
						<td class="form">{$form_data.login.label}</td><td class="form">{$form_data.login.html}</td>
					</tr>
					<tr>
						<td class="form">{$form_data.password1.label}</td><td class="form">{$form_data.password1.html}</td>
					</tr>
					<tr>
						<td class="form">{$form_data.password2.label}</td><td class="form">{$form_data.password2.html}</td>
					</tr>
					<tr>
				 	  <td class="form">{$form_data.sex.label}</td><td class="form">{$form_data.sex.html}</td>
					</tr>
					{if isset($form_data.checkbox)}
					<tr>
					  <td class="form" colspan="2">
						<table cellspacing="0">
						  <tr>
							<th colspan="4">{t}roles{/t}</th>
						  </tr>
						  {counter start=0 skip=1 assign=count}
						  <tr>
								{foreach item=role from=$roles}
								{assign var="count" value=$count+1}
								<td class="right">{$form_data.checkbox[$role.rid].html}</td>
								<td class="form">
								{if $role.rid == 3}
								  <font color="red">{t}{$form_data.checkbox[$role.rid].label}{/t}</font>
								{else}
									{t}{$form_data.checkbox[$role.rid].label}{/t}
								{/if}
								</td>
								{if $count == 2}
						  </tr>
						  <tr>
								{assign var="count" value=0}
								{/if}
						    {/foreach}
						  </tr>
						</table>
					</td>
					</tr>
					{/if}
					<tr>
				 	  <td class="form">{$form_data.status.label}</td><td class="form">{$form_data.status.html}</td>
					</tr>
					<tr>
						<td colspan="2" class="right">{$form_data.btn_Submit.label}{$form_data.btn_Submit.html}</td>
					</tr>
					<tr>
					  <td colspan="2" class="center">{$form_data.requirednote}</td>
				  </tr>
				</table>
				</form>
			</td>
			{/if}
		</tr>
	</table>
</div>